package com.sixbro.caicaitv.bean;

import java.util.ArrayList;
import java.util.List;

public class ChannelBean {
    private String name;
    private List<String> urls = new ArrayList<>();
    private int urlIndex = 0;
    private int type = 0;//1央视 ，2卫视

    public ChannelBean(String name, int type, String... urls) {
        this.name = name;
        this.type = type;
        for (String url : urls) {
            this.urls.add(url);
        }
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        String url = urls.get(urlIndex).trim();
        return url;
    }

    public boolean hasNextUrl() {
        return urlIndex < urls.size() - 1;
    }

    public void moveToNextUrl() {
        urlIndex++;
    }

    public List<String> getUrls() {
        return urls;
    }

    public void setUrls(List<String> urls) {
        this.urls = urls;
    }

    public int getUrlIndex() {
        return urlIndex;
    }

    public void setUrlIndex(int urlIndex) {
        this.urlIndex = urlIndex;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
